export default function createRoute (record, path) {
  // 创建一个路由对象，里面记录路径所对应的内容
  // route对象 --> { matched: [musicRecord], path: '/music' }
  // route对象 --> { matched: [musicRecord, popRecord], path: '/music/pop' }
  const matched = []

  while (record) {
    matched.unshift(record)
    record = record.parentRecord
  }

  return {
    matched,
    path
  }
}
